import { createRouter, createWebHistory } from "vue-router"
import Todo from "../views/todos/index.vue"
import Home from "../views/home/index.vue"
// new Router 

export const routes = [
    {
        path: '/',
        components: {
            default: Home
        },
        meta: {
            til: "首页"
        }
    },
    {
        path: '/todo',
        components: {
            default: Todo
        },
        meta: {
            til: "todo"
        }
    },
    {
        path: '/reactive',
        components: {
            default: () => import("../views/reactive/index.vue")
        },
        meta: {
            til: "reactive"
        }
    }
]
const router = createRouter({
    history: createWebHistory(), // createWebHistory()
    // mode:"hash / history"
    routes
})

export default router